<?php
	session_start();
	if (isset($_SESSION['username']))
	{
		$loguname = $_SESSION['username'];
?>
    <div id="photoupload">
        <div class="box">Upload Photo</div>
        <div class="uploadleft">
            <div class="button180" style="float:left" onclick="uploadfoto();">Upload</div>
            <div class="button180" style="float:left" onclick="divPhotoList('<?php echo $loguname;?>');">Back</div>
        </div>
        <div class="uploadright">
        <form action="php/photoop.php" name="upload" method="post" enctype="multipart/form-data">
            <input type="hidden" name="operation" value="upload" />
            <div class="editbox">File
                <input id="filename" class="dtextbox" type="file" name="foto"/>
            </div>
            <div class="editbox">Taken on :
                <input id = "tanggalLahir" class="dtextbox" type="text" name="tglambil"/>
                <a href="javascript:NewCal('tanggalLahir','yyyymmdd');"><img src="images/cal.gif" width="24" height="24" border="0" alt="Pick a date"/></a>
            </div>
            <div class="editbox">Description :
                <textarea class="dtextbox" type="text" name="idesc" rows="5"></textarea>
            </div><div class="editbox"> Keyword :
                <textarea class="dtextbox" type="text" name="ikeyword" rows="2"></textarea>
            </div><div class="editbox">Category :
                <select class="dtextbox" type="text" name="kategori" />
                <?php
                    require_once '../photo.php';
                    $cate = photo::getCategory();
                    $index = 0;
                    while ($crow = mysql_fetch_array($cate)){
                        echo '<option value="'.$index.'">'.$crow["Keterangan"].'</option>';	
                        $index++;
                    }
                ?>
                </select>
            </div><div class="editbox">Comment :
                <select class="dtextbox" name="hakkomen">
                  <option value="every">Everyone</option>
                  <option value="follower">Follower Only</option>
                  <option value="me">Me Only</option>
                </select>
            </div><div class="editbox">Access :
                <select class="dtextbox" name="hakakses">
                  <option value="every">Everyone</option>
                  <option value="follower">Follower Only</option>
                  <option value="me">Me Only</option>
                </select>
            </div>
        </form>
        </div>
    </div>
<?php
	}
	else{
		$login = false;
		require_once('../configu.php');
		header("Location: ".$CFG->url."home.php");
	}
?>